<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos  -->
			<title>Docs For Class DomArFile</title>
			<link rel="stylesheet" href="../../media/stylesheet.css" />
						<script src="../../media/lib/classTree.js"></script>
												<script language="javascript" type="text/javascript">
				var imgPlus = new Image();
				var imgMinus = new Image();
				imgPlus.src = "../../media/images/plus.png";
				imgMinus.src = "../../media/images/minus.png";
				
				function showNode(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
							var oImg = document.layers["img" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
							var oImg = document.all["img" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
							var oImg = document.getElementById("img" + Node);
									break;
							}
					oImg.src = imgMinus.src;
					oTable.style.display = "block";
				}
				
				function hideNode(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
							var oImg = document.layers["img" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
							var oImg = document.all["img" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
							var oImg = document.getElementById("img" + Node);
									break;
							}
					oImg.src = imgPlus.src;
					oTable.style.display = "none";
				}
				
				function nodeIsVisible(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
									break;
							}
					return (oTable && oTable.style.display == "block");
				}
				
				function toggleNodeVisibility(Node){
					if (nodeIsVisible(Node)){
						hideNode(Node);
					}else{
						showNode(Node);
					}
				}
			</script>
					</head>
		<body>
			<div class="page-body">			
<h2 class="class-name"><img src="../../media/images/Class_logo.png"
														alt=" Class"
														title=" Class"
														style="vertical-align: middle"> DomArFile</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
							<a href="#sec-descendents">Descendents</a>
			|											<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Plugin that helps to handle one file.</p>
<p class="description"><p>Notice that any changes you make to the files are done immediately. If you don't save you object after changing files then next time you load object file links are broken.  So you should save your object everytime you make changes to file. (Be sure that your object validates if calling save())</p><p>Its also useful when dealing with uploaded files check that everything is ok.  <div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-key">if</span><span class="src-sym">(&nbsp;</span><span class="src-var">$ob</span><span class="src-sym">-&gt;</span><span class="src-sym">)</span></div></li>
</ol></div></p><p>Using annotation</p></p>
		<p class="notes">
			Located in <a class="field" href="_libs---DomAr---Handlers---File---DomArFile.class.php.html">/libs/DomAr/Handlers/File/DomArFile.class.php</a> (line <span class="field"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a62">62</a></span>)
		</p>
		
				
		<pre><a href="../../DomAr/Plugin/DomArPlugin.html">DomArPlugin</a>
   |
   --DomArFile</pre>
	
			</div>
</div>

	<a name="sec-descendents"></a>
	<div class="info-box">
		<div class="info-box-title">Direct descendents</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
			<span class="disabled">Descendents</span>
			|												<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
								|															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<table cellpadding="2" cellspacing="0" class="class-table">
				<tr>
					<th class="class-table-header">Class</th>
					<th class="class-table-header">Description</th>
				</tr>
								<tr>
					<td style="padding-right: 2em; white-space: nowrap">
						<img src="../../media/images/Class.png"
								 alt=" class"
								 title=" class"
								 style="vertical-align: center"/>
						<a href="../../DomAr/Plugin/DomArImage.html">DomArImage</a>
					</td>
					<td>
											Validation errors and codes:
										</td>
				</tr>
							</table>
		</div>
	</div>


	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendants</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																								<div class="var-title">
					<img src="../../media/images/Variable.png" alt=" " />
					<span class="var-type">Array</span>
					<a href="#$allowedExtensions" title="details" class="var-name">$allowedExtensions</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendants</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																																																																																																																																																																			
				<div class="method-definition">
					<img src="../../media/images/StaticMethod.png" alt=" "/>
					static 						<span class="method-result">string</span>
										<a href="#makeIdTree" title="details" class="method-name">makeIdTree</a>
											(<span class="var-type">Int</span>&nbsp;<span class="var-name">$number</span>)
									</div>
																							
				<div class="method-definition">
					<img src="../../media/images/StaticMethod.png" alt=" "/>
					static 						<span class="method-result">Array</span>
										<a href="#pathInfo" title="details" class="method-name">pathInfo</a>
											(<span class="var-type">String</span>&nbsp;<span class="var-name">$path</span>)
									</div>
																							
				<div class="method-definition">
					<img src="../../media/images/StaticMethod.png" alt=" "/>
					static 						<span class="method-result">String</span>
										<a href="#repairName" title="details" class="method-name">repairName</a>
											(<span class="var-type">String</span>&nbsp;<span class="var-name">$name</span>)
									</div>
																																																																																			
				<div class="method-definition">
					<img src="../../media/images/Constructor.png" alt=" "/>
											<span class="method-result">DomArFile</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											([<span class="var-type">String</span>&nbsp;<span class="var-name">$path</span> = <span class="var-default">NULL</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$allowedExtensions</span> = <span class="var-default">array()</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$root</span> = <span class="var-default">DOMAR_FILE_DEFAULT_PATH</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$rootUrl</span> = <span class="var-default">DOMAR_FILE_DEFAULT_URL</span>])
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#addExisting" title="details" class="method-name">addExisting</a>
											(<span class="var-type">String</span>&nbsp;<span class="var-name">$path</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$newRelativePath</span> = <span class="var-default">NULL</span>], [<span class="var-type">Bool</span>&nbsp;<span class="var-name">$unlinkIfExists</span> = <span class="var-default">false</span>], <span class="var-type">String</span>&nbsp;<span class="var-name">$name</span>)
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#addUploaded" title="details" class="method-name">addUploaded</a>
											(<span class="var-type">String</span>&nbsp;<span class="var-name">$tmpPath</span>, <span class="var-type">String</span>&nbsp;<span class="var-name">$name</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$newRelativePath</span> = <span class="var-default">NULL</span>], [<span class="var-type">Bool</span>&nbsp;<span class="var-name">$unlinkIfExists</span> = <span class="var-default">false</span>], <span class="var-type">String</span>&nbsp;<span class="var-name">$newName</span>)
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">Bool</span>
										<a href="#autoRename" title="details" class="method-name">autoRename</a>
											(<span class="var-type">String</span>&nbsp;<span class="var-name">$mask</span>)
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">Bool</span>
										<a href="#cleanDirectoryTree" title="details" class="method-name">cleanDirectoryTree</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$relativePath</span>, <span class="var-type">String</span>&nbsp;<span class="var-name">$relativeDir</span>)
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">DomFile</span>
										<a href="#copy" title="details" class="method-name">copy</a>
											([<span class="var-type">String</span>&nbsp;<span class="var-name">$newRelativePath</span> = <span class="var-default">NULL</span>])
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">Bool</span>
										<a href="#createDirectoryTree" title="details" class="method-name">createDirectoryTree</a>
											(<span class="var-type">String</span>&nbsp;<span class="var-name">$relativeDir</span>)
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">Boolean</span>
										<a href="#delete" title="details" class="method-name">delete</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">Boolean</span>
										<a href="#exists" title="details" class="method-name">exists</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">Array</span>
										<a href="#getAllowedExtensions" title="details" class="method-name">getAllowedExtensions</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">String</span>
										<a href="#getDir" title="details" class="method-name">getDir</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">String</span>
										<a href="#getEncodedUrl" title="details" class="method-name">getEncodedUrl</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">String</span>
										<a href="#getExt" title="details" class="method-name">getExt</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">Int</span>
										<a href="#getFileSize" title="details" class="method-name">getFileSize</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">String</span>
										<a href="#getName" title="details" class="method-name">getName</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">String</span>
										<a href="#getNameExt" title="details" class="method-name">getNameExt</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">String</span>
										<a href="#getPath" title="details" class="method-name">getPath</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">String</span>
										<a href="#getRelativePath" title="details" class="method-name">getRelativePath</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">String</span>
										<a href="#getRelativeUrl" title="details" class="method-name">getRelativeUrl</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">String</span>
										<a href="#getRoot" title="details" class="method-name">getRoot</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">String</span>
										<a href="#getRootUrl" title="details" class="method-name">getRootUrl</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">String</span>
										<a href="#getUrl" title="details" class="method-name">getUrl</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">Boolean</span>
										<a href="#isExtensionSafe" title="details" class="method-name">isExtensionSafe</a>
											(<span class="var-type">String</span>&nbsp;<span class="var-name">$ext</span>)
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">Boolean</span>
										<a href="#isFileNameSafe" title="details" class="method-name">isFileNameSafe</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$fileName</span>, <span class="var-type">String</span>&nbsp;<span class="var-name">$path</span>)
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">Boolean</span>
										<a href="#isPathSafe" title="details" class="method-name">isPathSafe</a>
											(<span class="var-type">String</span>&nbsp;<span class="var-name">$path</span>)
									</div>
																							
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">String</span>
										<a href="#makeTmpFileName" title="details" class="method-name">makeTmpFileName</a>
											(<span class="var-type">String</span>&nbsp;<span class="var-name">$relativePath</span>)
									</div>
																							
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">Boolean</span>
										<a href="#rename" title="details" class="method-name">rename</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$newRelativePath</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$unlinkIfExists</span> = <span class="var-default">false</span>], <span class="var-type">String</span>&nbsp;<span class="var-name">$newPath</span>)
									</div>
																							
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#setAllowedExtensions" title="details" class="method-name">setAllowedExtensions</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$extensions</span>)
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#setPath" title="details" class="method-name">setPath</a>
											(<span class="var-type">String</span>&nbsp;<span class="var-name">$path</span>)
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#setRoot" title="details" class="method-name">setRoot</a>
											(<span class="var-type">String</span>&nbsp;<span class="var-name">$root</span>, [<span class="var-type">String</span>&nbsp;<span class="var-name">$rootUrl</span> = <span class="var-default">NULL</span>])
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#setRootUrl" title="details" class="method-name">setRootUrl</a>
											(<span class="var-type">String</span>&nbsp;<span class="var-name">$rootUrl</span>)
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">String</span>
										<a href="#toHtml" title="details" class="method-name">toHtml</a>
											([<span class="var-type"></span>&nbsp;<span class="var-name">$args</span> = <span class="var-default">array()</span>])
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#unlink" title="details" class="method-name">unlink</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#__clone" title="details" class="method-name">__clone</a>
										()
									</div>
															
				<div class="method-definition">
					<img src="../../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#__get" title="details" class="method-name">__get</a>
											(<span class="var-type">String</span>&nbsp;<span class="var-name">$var</span>)
									</div>
											</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			
<a name="var$allowedExtensions" id="$allowedExtensions"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<img src="../../media/images/Variable.png" />
		<span class="var-title">
			<span class="var-type">Array</span>
			<span class="var-name">$allowedExtensions</span>
						(line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a82">82</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">var:</span> allowed file extensions</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodmakeIdTree" id="makeIdTree"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/StaticMethod.png" />
		<span class="method-title">static makeIdTree</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a320">320</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Makes id tree for autorename IdTree parameter.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		static <span class="method-result">string</span>
		<span class="method-name">
			makeIdTree
		</span>
					(<span class="var-type">Int</span>&nbsp;<span class="var-name">$number</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">Int</span>
				<span class="var-name">$number</span>			</li>
				</ul>
		
			
	</div>
<a name="methodpathInfo" id="pathInfo"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/StaticMethod.png" />
		<span class="method-title">static pathInfo</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a508">508</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Almost same as PHP function pathinfo with some differences:  1) dirname is returned with ending slash if dirname exists. (for path aa/bb/cc.txt pathinfo returns dirname aa/bb, but this method returns aa/bb/)  2) if path ends with slash its assumed to be dir, not filepath. (pathinfo for path aa/bb/cc/ returns filename cc, but this method returns dirname aa/bb/cc/ and filename is empty.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		static <span class="method-result">Array</span>
		<span class="method-name">
			pathInfo
		</span>
					(<span class="var-type">String</span>&nbsp;<span class="var-name">$path</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">String</span>
				<span class="var-name">$path</span>			</li>
				</ul>
		
			
	</div>
<a name="methodrepairName" id="repairName"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/StaticMethod.png" />
		<span class="method-title">static repairName</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a551">551</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Checks that filename is ok</p>
<p class="description"><p>Basicly checks that all letters in file  name are allowed. If not allowed letter is skipped or replaced.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> Repaired name</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		static <span class="method-result">String</span>
		<span class="method-name">
			repairName
		</span>
					(<span class="var-type">String</span>&nbsp;<span class="var-name">$name</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">String</span>
				<span class="var-name">$name</span>			</li>
				</ul>
		
			
	</div>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Constructor.png" />
		<span class="method-title">Constructor __construct</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a87">87</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">DomArFile</span>
		<span class="method-name">
			__construct
		</span>
					([<span class="var-type">String</span>&nbsp;<span class="var-name">$path</span> = <span class="var-default">NULL</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$allowedExtensions</span> = <span class="var-default">array()</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$root</span> = <span class="var-default">DOMAR_FILE_DEFAULT_PATH</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$rootUrl</span> = <span class="var-default">DOMAR_FILE_DEFAULT_URL</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">String</span>
				<span class="var-name">$path</span><span class="var-description">: file path.</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$allowedExtensions</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$root</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$rootUrl</span>			</li>
				</ul>
		
			<hr class="separator" />
		<div class="notes">Redefinition of:</div>
		<dl>
			<dt><a href="../../DomAr/Plugin/DomArPlugin.html#method__construct">DomArPlugin::__construct()</a></dt>
					</dl>
			
	</div>
<a name="methodaddExisting" id="addExisting"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">addExisting</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a129">129</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">File is moved into $root path.</p>
<p class="description"><p>Be aware that if you use dot in your file name then you must add file extension as part after last dot is thought to be extension.  <div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-var">$f</span><span class="src-sym">-&gt;</span><a href="../../DomAr/Plugin/DomArFile.html#methodaddExisting">addExisting</a><span class="src-sym">(&nbsp;</span><span class="src-str">'/root/sourceFile.txt'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'myDir/myNewFile'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;File&nbsp;is&nbsp;copied&nbsp;from&nbsp;'/root/sourceFile.txt'&nbsp;to&nbsp;$f-&gt;root.'myDir/myNewFile.txt'</span></div></li>
</ol></div></p></p>
	<ul class="tags">
				<li><span class="field">throws:</span> InvalidArgumentException if file upload is not allowed and has no parent. If has parent validation error with code 10 is raised!</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			addExisting
		</span>
					(<span class="var-type">String</span>&nbsp;<span class="var-name">$path</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$newRelativePath</span> = <span class="var-default">NULL</span>], [<span class="var-type">Bool</span>&nbsp;<span class="var-name">$unlinkIfExists</span> = <span class="var-default">false</span>], <span class="var-type">String</span>&nbsp;<span class="var-name">$name</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">String</span>
				<span class="var-name">$path</span><span class="var-description">: file full path</span>			</li>
					<li>
				<span class="var-type">String</span>
				<span class="var-name">$name</span><span class="var-description">: file new path without extension. If not added file name is taken from original file.</span>			</li>
					<li>
				<span class="var-type">Bool</span>
				<span class="var-name">$unlinkIfExists</span><span class="var-description">: Unlink target file (before adding new file) if it exists.</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$newRelativePath</span>			</li>
				</ul>
		
			
	</div>
<a name="methodaddUploaded" id="addUploaded"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">addUploaded</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a104">104</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Add uploaded file</p>
<p class="description"><p><div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-var">$f</span><span class="src-sym">-&gt;</span><a href="../../DomAr/Plugin/DomArFile.html#methodaddUploaded">addUploaded</a><span class="src-sym">(&nbsp;</span><span class="src-var">$_FILES</span><span class="src-sym">[</span><span class="src-str">'tmp_name'</span><span class="src-sym">]</span><span class="src-sym">,&nbsp;</span><span class="src-var">$_FILES</span><span class="src-sym">[</span><span class="src-str">'name'</span><span class="src-sym">]</span><span class="src-sym">,&nbsp;</span><span class="src-str">'myDir/myFile'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></div></p></p>
	<ul class="tags">
				<li><span class="field">throws:</span> InvalidArgumentException if file upload is not allowed and has no parent. If has parent validation error with code 10 is raised!</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			addUploaded
		</span>
					(<span class="var-type">String</span>&nbsp;<span class="var-name">$tmpPath</span>, <span class="var-type">String</span>&nbsp;<span class="var-name">$name</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$newRelativePath</span> = <span class="var-default">NULL</span>], [<span class="var-type">Bool</span>&nbsp;<span class="var-name">$unlinkIfExists</span> = <span class="var-default">false</span>], <span class="var-type">String</span>&nbsp;<span class="var-name">$newName</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">String</span>
				<span class="var-name">$tmpPath</span><span class="var-description">: temporary path where file is located.</span>			</li>
					<li>
				<span class="var-type">String</span>
				<span class="var-name">$name</span><span class="var-description">: uploaded file name</span>			</li>
					<li>
				<span class="var-type">String</span>
				<span class="var-name">$newName</span><span class="var-description">: File new name that was uploaded. (NB! without extension). If NULL then $name is used.</span>			</li>
					<li>
				<span class="var-type">Bool</span>
				<span class="var-name">$unlinkIfExists</span><span class="var-description">: Unlink target file (before adding new file) if it exists.</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$newRelativePath</span>			</li>
				</ul>
		
			
	</div>
<a name="methodautoRename" id="autoRename"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">autoRename</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a278">278</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Auto renames file name using parent.</p>
<p class="description"><p>Use mask to set rename format. You can use:  <ul><li>[$className] - will be replaced by className</li><li>[$id] - will be replaced by parents id</li><li>[$idTree] - will construct a catalogue tree using $id. Tree will be something like millions/thousands/id. For example item with id 1234567 would be 1/234/1234567. Use this if you expect lots of files.</li><li>[$propertyName] - will be replaced by property name</li><li>[$rand] - will be replaced by random number from 100 to 999</li></ul>  <div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-var">$file</span><span class="src-sym">-&gt;</span><a href="../../DomAr/Plugin/DomArFile.html#methodautoRename">autoRename</a><span class="src-sym">(&nbsp;</span><span class="src-num">1&nbsp;</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;mask&nbsp;[$className]/[$id]-[$propertyName]&nbsp;will&nbsp;be&nbsp;used</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$file</span><span class="src-sym">-&gt;</span><a href="../../DomAr/Plugin/DomArFile.html#methodautoRename">autoRename</a><span class="src-sym">(&nbsp;</span><span class="src-num">2&nbsp;</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;mask&nbsp;[$className]/[$id]/[$propertyName]&nbsp;will&nbsp;be&nbsp;used</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$file</span><span class="src-sym">-&gt;</span><a href="../../DomAr/Plugin/DomArFile.html#methodautoRename">autoRename</a><span class="src-sym">(&nbsp;</span><span class="src-str">'1r'&nbsp;</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;mask&nbsp;[$className]/[$id]/[$propertyName]-[$rand]&nbsp;will&nbsp;be&nbsp;used</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$file</span><span class="src-sym">-&gt;</span><a href="../../DomAr/Plugin/DomArFile.html#methodautoRename">autoRename</a><span class="src-sym">(&nbsp;</span><span class="src-str">'2r'&nbsp;</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;mask&nbsp;[$className]/[$id]/[$propertyName]-[$rand]&nbsp;will&nbsp;be&nbsp;used</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$file</span><span class="src-sym">-&gt;</span><a href="../../DomAr/Plugin/DomArFile.html#methodautoRename">autoRename</a><span class="src-sym">(&nbsp;</span><span class="src-str">'idTree'&nbsp;</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;mask&nbsp;[$className]/[$idTree]/[$id]/[$propertyName&nbsp;will&nbsp;be&nbsp;used</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$file</span><span class="src-sym">-&gt;</span><a href="../../DomAr/Plugin/DomArFile.html#methodautoRename">autoRename</a><span class="src-sym">(&nbsp;</span><span class="src-str">'idTreeR'&nbsp;</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;mask&nbsp;[$className]/[$idTree]/[$id]/[$propertyName]-[$rand]&nbsp;will&nbsp;be&nbsp;used</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-var">$file</span><span class="src-sym">-&gt;</span><a href="../../DomAr/Plugin/DomArFile.html#methodautoRename">autoRename</a><span class="src-sym">(&nbsp;</span><span class="src-str">'myDir/[$className]/s_[$id]-[$propertyName]'&nbsp;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
</ol></div>  NB! This method unlinks target file if it exists.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">Bool</span>
		<span class="method-name">
			autoRename
		</span>
					(<span class="var-type">String</span>&nbsp;<span class="var-name">$mask</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">String</span>
				<span class="var-name">$mask</span>			</li>
				</ul>
		
			
	</div>
<a name="methodcleanDirectoryTree" id="cleanDirectoryTree"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">cleanDirectoryTree</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a424">424</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Removes folders that containt no files or dirs on given path. Used after file is deleted.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">Bool</span>
		<span class="method-name">
			cleanDirectoryTree
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$relativePath</span>, <span class="var-type">String</span>&nbsp;<span class="var-name">$relativeDir</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">String</span>
				<span class="var-name">$relativeDir</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$relativePath</span>			</li>
				</ul>
		
			
	</div>
<a name="methodcopy" id="copy"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">copy</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a335">335</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Makes copy of file. Internally makes clone of caller DomFile and copies file to new location.</p>
<p class="description"><p>Same as $a = clone $fileObject</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">DomFile</span>
		<span class="method-name">
			copy
		</span>
					([<span class="var-type">String</span>&nbsp;<span class="var-name">$newRelativePath</span> = <span class="var-default">NULL</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">String</span>
				<span class="var-name">$newRelativePath</span>			</li>
				</ul>
		
			
	</div>
<a name="methodcreateDirectoryTree" id="createDirectoryTree"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">createDirectoryTree</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a402">402</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Creates directory tree relative to root path.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">Bool</span>
		<span class="method-name">
			createDirectoryTree
		</span>
					(<span class="var-type">String</span>&nbsp;<span class="var-name">$relativeDir</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">String</span>
				<span class="var-name">$relativeDir</span>			</li>
				</ul>
		
			
	</div>
<a name="methoddelete" id="delete"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">delete</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a352">352</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Deletes file.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">Boolean</span>
		<span class="method-name">
			delete
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodexists" id="exists"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">exists</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a377">377</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">if file exists</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">Boolean</span>
		<span class="method-name">
			exists
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetAllowedExtensions" id="getAllowedExtensions"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">getAllowedExtensions</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a762">762</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">return:</span> Allowed extensions</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">Array</span>
		<span class="method-name">
			getAllowedExtensions
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetDir" id="getDir"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">getDir</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a746">746</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">return:</span> File dir relative to root path.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">String</span>
		<span class="method-name">
			getDir
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetEncodedUrl" id="getEncodedUrl"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">getEncodedUrl</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a700">700</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">return:</span> Url encoded url</li>
				<li><span class="field">see:</span> self::getUrl()</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">String</span>
		<span class="method-name">
			getEncodedUrl
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetExt" id="getExt"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">getExt</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a722">722</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">return:</span> File extension</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">String</span>
		<span class="method-name">
			getExt
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetFileSize" id="getFileSize"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">getFileSize</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a628">628</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns file size</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">Int</span>
		<span class="method-name">
			getFileSize
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetName" id="getName"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">getName</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a730">730</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">return:</span> File name without extension</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">String</span>
		<span class="method-name">
			getName
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetNameExt" id="getNameExt"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">getNameExt</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a738">738</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">return:</span> File name with extension</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">String</span>
		<span class="method-name">
			getNameExt
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetPath" id="getPath"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">getPath</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a678">678</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">return:</span> File full path</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">String</span>
		<span class="method-name">
			getPath
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetRelativePath" id="getRelativePath"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">getRelativePath</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a755">755</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">return:</span> File relative path to root path.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">String</span>
		<span class="method-name">
			getRelativePath
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetRelativeUrl" id="getRelativeUrl"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">getRelativeUrl</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a716">716</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">return:</span> File relative url to root url. (Internally same as getRelativePath)</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">String</span>
		<span class="method-name">
			getRelativeUrl
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetRoot" id="getRoot"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">getRoot</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a664">664</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">String</span>
		<span class="method-name">
			getRoot
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetRootUrl" id="getRootUrl"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">getRootUrl</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a671">671</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">String</span>
		<span class="method-name">
			getRootUrl
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetUrl" id="getUrl"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">getUrl</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a685">685</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">return:</span> File url if it is possible to find file from url. Returns Null if there is not file related.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">String</span>
		<span class="method-name">
			getUrl
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodisExtensionSafe" id="isExtensionSafe"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">isExtensionSafe</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a497">497</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">If file extension is allowed</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">Boolean</span>
		<span class="method-name">
			isExtensionSafe
		</span>
					(<span class="var-type">String</span>&nbsp;<span class="var-name">$ext</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">String</span>
				<span class="var-name">$ext</span>			</li>
				</ul>
		
			
	</div>
<a name="methodisFileNameSafe" id="isFileNameSafe"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">isFileNameSafe</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a488">488</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">If filename is safe. Doesn't check if extension is allowed!</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">Boolean</span>
		<span class="method-name">
			isFileNameSafe
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$fileName</span>, <span class="var-type">String</span>&nbsp;<span class="var-name">$path</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">String</span>
				<span class="var-name">$path</span><span class="var-description">: Dir or filename .</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$fileName</span>			</li>
				</ul>
		
			
	</div>
<a name="methodisPathSafe" id="isPathSafe"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">isPathSafe</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a467">467</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">If path is safe</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">Boolean</span>
		<span class="method-name">
			isPathSafe
		</span>
					(<span class="var-type">String</span>&nbsp;<span class="var-name">$path</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">String</span>
				<span class="var-name">$path</span><span class="var-description">: Dir or filename .</span>			</li>
				</ul>
		
			
	</div>
<a name="methodmakeTmpFileName" id="makeTmpFileName"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">makeTmpFileName</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a449">449</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Makes new file name. If file exists on path tries to find file name that is unique.</p>
	<ul class="tags">
				<li><span class="field">return:</span> New path</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">String</span>
		<span class="method-name">
			makeTmpFileName
		</span>
					(<span class="var-type">String</span>&nbsp;<span class="var-name">$relativePath</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">String</span>
				<span class="var-name">$relativePath</span><span class="var-description">: relative path to file.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodrename" id="rename"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">rename</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a212">212</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Renames file relative dir. File location must be relative to root path. If you add filename that will also be changed.</p>
<p class="description"><p>$file-&gt;rename('newFileName');  $file-&gt;rename('newFileName.newExtension');  $file-&gt;rename('/newFileName.newExtension'); move file to rootPath with newName.  $file-&gt;rename('newPath/to/file/');  $file-&gt;rename('newPath/to/file/newName');  $file-&gt;rename('newPath/to/file/newName.asdf'); //everything after one dot is considered extension. So this will rename file to newName.asdf NOT to newName.asdf.txt  $file-&gt;rename('newPath/to/file/newName.txt');</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">Boolean</span>
		<span class="method-name">
			rename
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$newRelativePath</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$unlinkIfExists</span> = <span class="var-default">false</span>], <span class="var-type">String</span>&nbsp;<span class="var-name">$newPath</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">String</span>
				<span class="var-name">$newPath</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$newRelativePath</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$unlinkIfExists</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetAllowedExtensions" id="setAllowedExtensions"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">setAllowedExtensions</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a585">585</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setAllowedExtensions
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$extensions</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">Array</span>
				<span class="var-name">$extensions</span><span class="var-description">: List with allowed file extensions. Like array('doc','txt', ...)</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetPath" id="setPath"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">setPath</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a575">575</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setPath
		</span>
					(<span class="var-type">String</span>&nbsp;<span class="var-name">$path</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">String</span>
				<span class="var-name">$path</span><span class="var-description">: file path</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetRoot" id="setRoot"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">setRoot</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a594">594</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">If root differs from current root then file path will be renamed to new root location. No dirs will be created, file will be moved to root dir.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setRoot
		</span>
					(<span class="var-type">String</span>&nbsp;<span class="var-name">$root</span>, [<span class="var-type">String</span>&nbsp;<span class="var-name">$rootUrl</span> = <span class="var-default">NULL</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">String</span>
				<span class="var-name">$root</span><span class="var-description">: root path.</span>			</li>
					<li>
				<span class="var-type">String</span>
				<span class="var-name">$rootUrl</span><span class="var-description">: root url If not specified then assumed that files cannot be accessed from url.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetRootUrl" id="setRootUrl"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">setRootUrl</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a611">611</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setRootUrl
		</span>
					(<span class="var-type">String</span>&nbsp;<span class="var-name">$rootUrl</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">String</span>
				<span class="var-name">$rootUrl</span><span class="var-description">: root url If not specified then assumed that files cannot be accessed from url.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodtoHtml" id="toHtml"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">toHtml</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a771">771</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">String</span>
		<span class="method-name">
			toHtml
		</span>
					([<span class="var-type"></span>&nbsp;<span class="var-name">$args</span> = <span class="var-default">array()</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">Array</span>
				<span class="var-name">$args</span><span class="var-description">: Currenlty no arguments are parsed!</span>			</li>
				</ul>
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../../DomAr/Plugin/DomArImage.html#methodtoHtml">DomArImage::toHtml()</a>
								: Convert image to html
							</li>
					<li>
				<a href="../../DomAr/Plugin/DomArMedia.html#methodtoHtml">DomArMedia::toHtml()</a>
								: Convert image to html
							</li>
				</ul>
	</div>
<a name="methodunlink" id="unlink"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">unlink</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a369">369</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Synonym for delete.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			unlink
		</span>
				()
			</div>
	
		
			
	</div>
<a name="method__clone" id="__clone"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">__clone</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a384">384</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Makes clone of DoMArFile object and copies file.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			__clone
		</span>
				()
			</div>
	
		
			
	</div>
<a name="method__get" id="__get"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../../media/images/Method.png" />
		<span class="method-title">__get</span> (line <span class="line-number"><a href="../../__filesource/fsource_DomAr_Plugin_libsDomArHandlersFileDomArFile.class.php.html#a635">635</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			__get
		</span>
					(<span class="var-type">String</span>&nbsp;<span class="var-name">$var</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">String</span>
				<span class="var-name">$var</span>			</li>
				</ul>
		
			
	</div>
							<h4>Inherited Methods</h4>
				<a name='inherited_methods'><!-- --></a>	
									<!-- =========== Summary =========== -->
					<p>Inherited From <span class="classname"><a href="../../DomAr/Plugin/DomArPlugin.html">DomArPlugin</a></span></p>
					<blockquote>
													<img src="../../media/images/Constructor.png" alt=" "/>
							<span class="method-name"><a href="../../DomAr/Plugin/DomArPlugin.html#method__construct">DomArPlugin::__construct()</a></span><br>
													<img src="../../media/images/Method.png" alt=" "/>
							<span class="method-name"><a href="../../DomAr/Plugin/DomArPlugin.html#methodchanged">DomArPlugin::changed()</a></span><br>
													<img src="../../media/images/Method.png" alt=" "/>
							<span class="method-name"><a href="../../DomAr/Plugin/DomArPlugin.html#methodchangeParent">DomArPlugin::changeParent()</a></span><br>
													<img src="../../media/images/Method.png" alt=" "/>
							<span class="method-name"><a href="../../DomAr/Plugin/DomArPlugin.html#methodgetParent">DomArPlugin::getParent()</a></span><br>
													<img src="../../media/images/Method.png" alt=" "/>
							<span class="method-name"><a href="../../DomAr/Plugin/DomArPlugin.html#methodgetProperty">DomArPlugin::getProperty()</a></span><br>
											</blockquote>
										
		</div>
	</div>

	
	<p class="notes" id="credit">
		Documentation generated on Fri, 24 Sep 2010 21:12:22 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.1</a>
	</p>
	</div></body>
</html>